using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Tongiao.Config;     
using Tongiao.Entity;
namespace Tongiao.ManagerBase
{
                

     public abstract class Tg_LocationManagerBase
    {
        public Tg_LocationManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity Insert(Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity Update(Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.Update(obj);             
        }
 
 
        public Tg_LocationEntity Delete(Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByCreatedBy (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedBy 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByCreatedBy (string CreatedBy )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedBy = CreatedBy;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByCreatedDate (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien CreatedDate 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByCreatedDate (DateTime CreatedDate )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedDate = CreatedDate;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteById (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien Id 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteById (Guid Id )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.Id = Id;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"Id");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByIdLoaiDao (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"IdLoaiDao");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien IdLoaiDao 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByIdLoaiDao (string IdLoaiDao )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.IdLoaiDao = IdLoaiDao;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"IdLoaiDao");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByLocationName (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"LocationName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien LocationName 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByLocationName (string LocationName )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.LocationName = LocationName;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"LocationName");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByUpdatedBy (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedBy 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByUpdatedBy (string UpdatedBy )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedBy = UpdatedBy;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByUpdatedDate (Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UpdatedDate 
        /// </summary>
        /// <returns>Tg_LocationEntity</returns>
        public Tg_LocationEntity DeleteByUpdatedDate (DateTime UpdatedDate )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedDate = UpdatedDate;  
            return (Tg_LocationEntity)Adapter.DeleteByField(obj,"UpdatedDate");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public Tg_LocationEntity Select(Tg_LocationEntity obj)
        { 
            return (Tg_LocationEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(Tg_LocationEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(Tg_LocationEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new Tg_LocationEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new Tg_LocationEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<Tg_LocationEntity> SelectAllLST()
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new Tg_LocationEntity()),new Tg_LocationEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<Tg_LocationEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new Tg_LocationEntity(),option),new Tg_LocationEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByCreatedByLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByCreatedByLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedBy",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedBy (string CreatedBy, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedBy = CreatedBy;  
            return Adapter.SelectByField(obj,"CreatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByCreatedByLST (string CreatedBy )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByCreatedByLST (string CreatedBy, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedBy = CreatedBy;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedBy",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByCreatedDateLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByCreatedDateLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"CreatedDate",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByCreatedDate (DateTime CreatedDate, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedDate = CreatedDate;  
            return Adapter.SelectByField(obj,"CreatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByCreatedDateLST (DateTime CreatedDate )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien CreatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByCreatedDateLST (DateTime CreatedDate, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.CreatedDate = CreatedDate;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"CreatedDate",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByIdLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByIdLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"Id",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectById (Guid Id, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.Id = Id;  
            return Adapter.SelectByField(obj,"Id",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByIdLST (Guid Id )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.Id = Id;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien Id duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByIdLST (Guid Id, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.Id = Id;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"Id",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIdLoaiDao (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"IdLoaiDao");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIdLoaiDao (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"IdLoaiDao",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByIdLoaiDaoLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IdLoaiDao"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByIdLoaiDaoLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"IdLoaiDao",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIdLoaiDao (string IdLoaiDao )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.IdLoaiDao = IdLoaiDao;  
            return Adapter.SelectByField(obj,"IdLoaiDao");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByIdLoaiDao (string IdLoaiDao, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.IdLoaiDao = IdLoaiDao;  
            return Adapter.SelectByField(obj,"IdLoaiDao",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByIdLoaiDaoLST (string IdLoaiDao )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.IdLoaiDao = IdLoaiDao;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IdLoaiDao"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien IdLoaiDao duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByIdLoaiDaoLST (string IdLoaiDao, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.IdLoaiDao = IdLoaiDao;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"IdLoaiDao",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLocationName (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"LocationName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLocationName (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"LocationName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByLocationNameLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"LocationName"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByLocationNameLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"LocationName",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLocationName (string LocationName )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.LocationName = LocationName;  
            return Adapter.SelectByField(obj,"LocationName");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByLocationName (string LocationName, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.LocationName = LocationName;  
            return Adapter.SelectByField(obj,"LocationName",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByLocationNameLST (string LocationName )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.LocationName = LocationName;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"LocationName"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien LocationName duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByLocationNameLST (string LocationName, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.LocationName = LocationName;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"LocationName",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByUpdatedByLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByUpdatedByLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedBy",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedBy (string UpdatedBy, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedBy = UpdatedBy;  
            return Adapter.SelectByField(obj,"UpdatedBy",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByUpdatedByLST (string UpdatedBy )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedBy duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByUpdatedByLST (string UpdatedBy, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedBy = UpdatedBy;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedBy",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (Tg_LocationEntity obj)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (Tg_LocationEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByUpdatedDateLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectByUpdatedDateLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UpdatedDate",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUpdatedDate (DateTime UpdatedDate, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedDate = UpdatedDate;  
            return Adapter.SelectByField(obj,"UpdatedDate",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByUpdatedDateLST (DateTime UpdatedDate )
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate"),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UpdatedDate duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Tg_LocationEntity> SelectByUpdatedDateLST (DateTime UpdatedDate, SelectOptions option)
        { 
            Tg_LocationEntity obj = new Tg_LocationEntity();
            obj.UpdatedDate = UpdatedDate;  
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UpdatedDate",option),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectWithConditionLST (Tg_LocationEntity obj)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new Tg_LocationEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<Tg_LocationEntity></returns>
        public List<Tg_LocationEntity> SelectWithConditionLST (Tg_LocationEntity obj,SelectOptions option)
        { 
            return  (List<Tg_LocationEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new Tg_LocationEntity());
        }

}
}
